<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
  </head>
  <style>
    @keyframes aaa{
    	from{opacity: 0;}
    	to{opacity: 1;}
    }
    div{
      width: 200px;
      height:200px;
      margin-top: 200px ;
      margin-right:0px ;
      background: #ccc;
      float: left;
    }
    .box{
      animation: aaa .45s ease-in-out 3;
    }
  </style>
  <body>
    <button type="button" id="btn">添加</button>
    <div class="box"></div>
    <script>
      btn.onclick =function(){
        let divDOM = document.createElement("div")
        console.log(divDOM)
        document.body.appendChild(divDOM)
        divDOM.classList="box"
      }
    </script>
  </body>
</html>
